/**
 * Utils class 
 */

Ext.ns('app'); 

app.Utils = function(){
	
	function checkStartedTasksCallback(result){
		
		if(!result.success){
			var msg = 'Task <b><i>' + result.taskName + '</i></b> is still started from last session.'; 
			app.getTaskWall().setCurrentTask(result.taskId); 
			app.Msg.warn(msg); 
		}
		
	}
	
	return {
		
		checkStartedTasks : function(){
			TimeTracker.checkStartedTasks({},checkStartedTasksCallback); 
		}
				
	}; 
	
}(); 


/*
 * Date Formats
 */
app.Utils.DateFormat = {
		
	W3C 			: 'Y-m-d\TH:i:sP', 
	
	SIMPLE 			: 'd/m/Y', 
	
	FULL			: 'd/m/Y H:i:s', 
	
	TIME			: 'H:i:s'
	
}; 

app.Utils.TimeDiv = new Array(); 

app.Utils.TimeDiv[''] = 0; 
